<?php
use yii\widgets\ActiveForm;
use yii\helpers\Url;
?>
		<meta charset="utf-8">
		<link  rel="stylesheet" href="../css/pinglun.css" />
		<link rel="stylesheet" type="text/css" href="../css/sinaFaceAndEffec.css" />
            <div id="content" style="width: 90%; min-height: 500px;margin-top: 20px">
                <div class="wrap">
                    <div class="comment"style="min-height: 200px">

                        <div class="head-face">
                            <img src="../images/konglong.jpg" / >
                            <p><?if(!Yii::$app->user->isGuest)echo Yii::$app->user->identity->username?></p>
                        </div>
                        <?php $form = ActiveForm::begin(['action'=>Url::to(['site/comment']),'options' => ['enctype' => 'multipart/form-data']]); ?>
                        <div class="content">
                            <div class="cont-box">
                                <textarea class="text" <?if(Yii::$app->user->isGuest)echo 'disabled="disabled"'?> name="content" <?if(!Yii::$app->user->isGuest)echo 'placeholder="请输入..."';else echo 'placeholder="你还没登录哦！"';?>></textarea>

                            </div>
                            <div class="tools-box">
                                <div class="submit-btn"><input class="text" type="submit"  value="提交评论" /></div>
                            </div>

                            <input type="hidden" name = 'img_id' value="<?=$model->id?>">
                            <input type="hidden" name = 'user_id' value="<?=Yii::$app->user->id?>">

                            <?= $form->field($uf, 'file')->fileInput() ?>
                        </div>
                        <?php ActiveForm::end(); ?>
                    </div>

                    <div id="info-show">
                        <ul>
                            <?foreach ($cd as $k=>$v){?>
                            <li>
                                <div class="head-face">
                                    <img src="images/konglong.jpg" / >
                                </div>
                                <div class="reply-cont">
                                    <p class="username"><?=$v['user_info']['username']?>	</p>

                                    <p class="comment-body"><?=$v['content']?></p>
                                    <p class="username"> <img src="<?=Yii::$app->request->hostInfo.'/'.$v['url']?>" width="100%" / >	</p>

                                    <p class="comment-footer"><?=date('y-m-d',$v['create_time'])?>　回复　点赞54　转发12</p>
                                </div>
                            </li>
                            <?}?>
                        </ul>
                    </div>
                </div>
		    </div>
	</body>
